﻿<%@ Page Title="" Language="C#" MasterPageFile="~/StarSecurityServices.Master" AutoEventWireup="true" CodeBehind="frmManagerContract.aspx.cs" Inherits="eProject_SEM3_SecurityServices.Presentations.frmManagerContract" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style2
        {
            width: 159px;
            height: 33px;
        }
        .style3
        {
            height: 33px;
        }
        .style5
        {
            height: 29px;
        }
        .style7
        {
            height: 29px;
        }
        .style8
        {
            width: 159px;
            height: 29px;
        }
        .style9
        {
            width: 155px;
            height: 33px;
        }
        .style10
        {
            width: 450px;
        }
        .backgroundImage
        {
        	background-image:url("Image/mui_ten.gif")/>
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="pnlNewContract" runat="server" ForeColor="#3366FF" 
        GroupingText="New Contract">
        <table style="width:100%;">
            <tr>
                <td class="style10">
                    <table style="margin-left: 20px; margin-top: 10px; margin-bottom: 5px; width:93%; float:left; height: 180px;">
                        <tbody>
                            <tr>
                                <td class="style2">
                                    <asp:Label ID="Label6" runat="server" Text="Customer Id: "></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:Label ID="CustomerID" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    <asp:Label ID="Label1" runat="server" Text="Customer Name: "></asp:Label>
                                </td>
                                <td class="style3">
                                    <asp:Label ID="CustomerName" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="style8">
                                    <asp:Label ID="Label2" runat="server" Text="Customer Phone: "></asp:Label>
                                </td>
                                <td class="style5">
                                    <asp:Label ID="CustomerPhone" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="style8">
                                    <asp:Label ID="Label5" runat="server" Text="Customer Address: "></asp:Label>
                                </td>
                                <td class="style7">
                                    <asp:Label ID="CustomerAddress" runat="server"></asp:Label>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td>
                    <table style="width:100%;">
                        <tr>
                            <td class="style9">
                                Register Day</td>
                            <td>
                                <asp:TextBox ID="txtRegistryDay" runat="server" Width="50%" Enabled="False"></asp:TextBox>
                                <asp:ImageButton ID="ibtnRegistDay" runat="server" Height="22px" 
                                    ImageUrl="~/Image/mui_ten.gif" onclick="ibtnRegistDay_Click1" 
                                    ToolTip="Select date" />
                                <asp:Calendar ID="cldRegistDay" runat="server" 
                                    onselectionchanged="cldRegistDay_SelectionChanged1" ToolTip="Select date" 
                                    Visible="False"></asp:Calendar>
                            </td>
                        </tr>
                        <tr>
                            <td class="style9">
                                Start Day</td>
                            <td>
                                <asp:TextBox ID="txtStartDay" runat="server" Width="50%" Enabled="False"></asp:TextBox>
                                <asp:ImageButton ID="ibtnStartDay" runat="server" Height="22px" 
                                    ImageUrl="~/Image/mui_ten.gif" onclick="ibtnStartDay_Click1" 
                                    ToolTip="Select date" />
                                <asp:Calendar ID="cldStartDay" runat="server" 
                                    onselectionchanged="cldStartDay_SelectionChanged1" ToolTip="Select date" 
                                    Visible="False"></asp:Calendar>
                            </td>
                        </tr>
                        <tr>
                            <td class="style9">
                                End Day</td>
                            <td>
                                <asp:TextBox ID="txtEndDay" runat="server" Width="50%" Enabled="False"></asp:TextBox>
                                <asp:ImageButton ID="ibtnEndDay" runat="server" Height="22px" 
                                    ImageUrl="~/Image/mui_ten.gif" onclick="ibtnEndDay_Click1" style="width: 22px" 
                                    ToolTip="Select date" />
                                <asp:Calendar ID="cldEndDay" runat="server" 
                                    onselectionchanged="cldEndDay_SelectionChanged1" ToolTip="Select date" 
                                    Visible="False"></asp:Calendar>
                            </td>
                        </tr>
                        <tr>
                            <td class="style9">
                                Service</td>
                            <td>
                                <asp:DropDownList ID="ddlService" runat="server" AutoPostBack="True" 
                                    Width="51%" Height="20px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style9">
                                Number Employee</td>
                            <td>
                                <asp:TextBox ID="txtnumberEmp" runat="server" Width="50%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style9">
                                Status: </td>
                            <td>
                                <asp:DropDownList ID="ddlStatus" runat="server" AutoPostBack="True">
                                    <asp:ListItem Selected="True">Select status</asp:ListItem>
                                    <asp:ListItem Value="0">Pending</asp:ListItem>
                                    <asp:ListItem Value="1">Seen</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style9">
                                <asp:Button ID="btnAddnewContract" runat="server" onclick="Button1_Click" 
                                    Text="Add New Contract" ToolTip="Add Contract" />
                            </td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </asp:Panel>
    <asp:Panel ID="pnlContractList" runat="server" BorderStyle="None" 
        ForeColor="#3366FF" GroupingText="Contract information" Width="100%">
        <asp:GridView ID="grvContract" runat="server" AutoGenerateColumns="False" 
            BorderStyle="None" BorderWidth="0px" CellPadding="3" Width="100%" 
            ForeColor="#6666FF" AllowPaging="True" DataKeyNames="contractId" 
            ShowFooter="True" onrowcancelingedit="grvContract_RowCancelingEdit" 
            onrowdeleting="grvContract_RowDeleting" onrowediting="grvContract_RowEditing" 
            onrowupdating="grvContract_RowUpdating" onpageindexchanging="grvContract_PageIndexChanging" 
            >
            <Columns>           
                <asp:TemplateField HeaderText="Detail">
                    <FooterTemplate>
                        &nbsp;Contract(s):
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" 
                            ImageUrl="~/Image/select_icon.gif" NavigateUrl='<%#"frmContractDetail.aspx?Contractid=" + Eval("contractId") + "&CustomerID=" + Eval("CustomerID") %>'></asp:HyperLink></ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
                </asp:TemplateField>               
                <asp:TemplateField HeaderText="Contract ID">
                    <EditItemTemplate>
                        <asp:Label ID="lblContactId" runat="server" Text='<%# Bind("contractId") %>'></asp:Label>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:Label ID="lblCount" runat="server"></asp:Label>
                    </FooterTemplate>
                    <ItemTemplate>
                        <%#Eval("contractId")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:TemplateField HeaderText="Customer ID">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtCustomberId" runat="server" Text='<%#Bind("customerId") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%#Eval("customerId")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Service ID">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtServiceId" runat="server" Text='<% #Bind("serviceId") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%#Eval("serviceId")%>
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:TemplateField HeaderText="Number Of Employee">
                    <ItemTemplate>
                        <%#Eval("numberEmployee") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtNumOfEm" runat="server" Text='<%#Bind("numberEmployee") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Registry Date">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtRegistryDateE" runat="server" Text='<%#Bind("RegistryDay") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate><%#Eval("RegistryDay")%></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Start Date">
                    <ItemTemplate>
                        <%#Eval("startDay")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtStartDateE" runat="server" Height="22px" 
                            Text='<% #Bind("startDay") %>' Width="116px"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="End Date">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtEndDateE" runat="server" Height="22px" 
                            Text='<% #Bind("endDay") %>' Width="116px"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%#Eval("endDay")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Status">                   
                    <ItemTemplate>
                        <%#Eval("Status") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="ddlStatus" runat="server" AutoPostBack="True">
                            <asp:ListItem Selected="True" Value="0">Pending</asp:ListItem>
                            <asp:ListItem Value="1">Seen</asp:ListItem>
                        </asp:DropDownList>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="Label3" runat="server" Text="Data not found!"></asp:Label>
            </EmptyDataTemplate>
            <FooterStyle BackColor="White" ForeColor="#000066" />
            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
            <PagerSettings NextPageText="Next" PreviousPageText="Previous" />
            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Center" />
            <RowStyle ForeColor="#000066" />
            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#007DBB" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#00547E" />
        </asp:GridView>
    </asp:Panel>
</asp:Content>
